From 1e768defd1f204077eaeeec6e24cdfc125eca4ad Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 18 Jan 2007 22:11:06 +0000 Subject: [PATCH] Handle leading whitespace in whitespace separated xcsv files again. --- csv_util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/csv_util.c b/csv_util.c index c08287475..9b85b005c 100644 --- a/csv_util.c +++ b/csv_util.c @@ -1008,7 +1008,10 @@ xcsv_data_read(void) while ((buff = gbfgetstr(xcsv_file.xcsvfp))) { linecount++; - buff = lrtrim(buff); + /* Whack trailing space; leading space may matter if our field sep + * is whitespace and we have leading whitespace. + */ + buff = rtrim(buff); /* skip over x many lines on the top for the prologue... */ if ((xcsv_file.prologue_lines) && ((linecount - 1) < -- 2.30.2